{{#if CAN.VIEW_TOOLBAR}}
<div class="header-bar-outer-container">
  <div class="header-bar-container sticky-toolbar" data-sticky>
    <div class="header-bar flex-container">
      <div class="header-bar-left header-left-flex">
        {{#if course_home}}
        <h2 class="course-title ellipsis" title="{{course_title}}">{{course_title}}</h2>
        {{else}}
          {{#if CAN.VIEW_ALL_PAGES}}
            <a class="btn{{#if front_page}} btn-primary{{/if}} view_all_pages" href="{{wiki_pages_path}}">{{#t 'buttons.view_all_pages'}}View All Pages{{/t}}</a>
          {{/if}}
        {{/if}}
      </div>
      <div class="header-bar-right header-right-flex">
        {{#unless course_home}}
          {{#if front_page}}
            <span class="front-page label">{{#t 'labels.front_page'}}Front Page{{/t}}</span>
          {{/if}}
          {{#if CAN.PUBLISH}}
            <span class="publish-button"></span>
          {{else}}
            {{#if CAN.VIEW_UNPUBLISHED}}
              {{#if published}}
                <span class='published-status published'>
                  <i class="icon-publish icon-Solid"></i> {{#t 'published_indicator'}}Published{{/t}}
                </span>
              {{else}}
                <span class='published-status unpublished'>
                  <i class="icon-unpublished"></i> {{#t 'unpublished_indicator'}}Not Published{{/t}}
                </span>
              {{/if}}
            {{/if}}
          {{/if}}
        {{/unless}}
        {{#unless cannot_edit_by_master_course}}
          {{#if CAN.UPDATE_CONTENT}}
            <a href="{{wiki_page_edit_path}}" class="btn edit-wiki"><i class="icon-edit"></i> {{#t 'buttons.edit'}}Edit{{/t}}</a>
          {{/if}}
        {{/unless}}
        {{#if CAN.ACCESS_GEAR_MENU}}
          <div class="inline-block">
            <a class="btn al-trigger" tabindex="0" role="button" href="#">
              <i class="icon-settings"></i><i class="icon-mini-arrow-down"></i>
              
            </a>
            <ul class="al-options">
              {{#unless cannot_delete_by_master_course}}
                {{#if CAN.DELETE}}
                  <li><a href="#" class="icon-trash delete_page{{#unless deletable}} disabled{{/unless}}" {{#unless deletable}}aria-disabled="true"{{/unless}}>{{#t "delete_wiki"}}Delete{{/t}}</a></li>
                {{/if}}
              {{/unless}}
              {{#if CAN.READ_REVISIONS}}
                <li><a href="{{wiki_page_history_path}}" class="icon-clock view_page_history">{{#t "view_page_history_wiki"}}View Page History{{/t}}</a></li>
              {{/if}}
              {{#unless front_page}}
                <li><a href="#" class="icon-document use-as-front-page-menu-item{{#unless published}} disabled{{/unless}}" title="{{#t 'menu.use_front_page'}}Use as Front Page{{/t}}" {{#unless published}}aria-disabled="true"{{/unless}}>{{#t 'menu.use_front_page'}}Use as Front Page{{/t}}</a></li>
              {{/unless}}
              {{>ExternalTools/external_tools_menu wiki_page_menu_tools}}
            </ul>
          </div>
        {{/if}}
      </div>
    </div>
    <div class="page-changed-alert" role="alert" aria-atomic="true" aria-live="polite"></div>
  </div>
</div>
{{/if}}

<div class="show-content user_content clearfix">
  <h1 class="page-title">{{title}}</h1>
  {{#if locked_for_user}}
    <div class="spinner"></div>
    <div class="lock_explanation"></div>
  {{else}}
    {{convertApiUserContent body}}
  {{/if}}
</div>
